home *** CD-ROM | disk | FTP | other *** search
- FFPOS(3C) Last changed: 2-17-98
-
-
- NNAAMMEE
- ffffppooss - Positions files opened using flexible file I/O
-
- SSYYNNOOPPSSIISS
- ##iinncclluuddee <<ffffiioo..hh>>
-
- UNICOS and UNICOS/mk systems:
-
- iinntt ffffppooss ((iinntt _f_d, iinntt _c_m_d, lloonngg **_a_r_g , iinntt _l_e_n, ssttrruucctt ffffssww
- **_s_t_a_t));;
-
- IRIX systems:
-
- ooffff__tt ffffppooss ((iinntt _f_d, iinntt _c_m_d, vvooiidd **_a_r_g , iinntt _l_e_n, ssttrruucctt ffffssww
- **_s_t_a_t));;
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- UNICOS, UNICOS/mk, and IRIX systems
-
- DDEESSCCRRIIPPTTIIOONN
- The ffffppooss function provides a way of positioning files opened by
- ffffooppeenn or ffffooppeennss (see ffffooppeenn(3C)), using flexible file I/O (FFIO).
- The arguments are as follows:
-
- _f_d Value returned by ffffooppeenn or ffffooppeennss.
-
- _c_m_d Specifies a value defined in header file ffffiioo..hh. See the
- following subsection, VALUES FOR _c_m_d ARGUMENT.
-
- _a_r_g The type and value of this argument is _c_m_d specific. See
- preceding descriptions.
-
- _l_e_n If _c_m_d = FFPP__GGEETTPPOOSS or FFPP__SSEETTPPOOSS, _l_e_n specifies the number of
- Cray words in _a_r_g. This parameter is ignored for other values
- of _c_m_d.
-
- _s_t_a_t Pointer to the status return structure.
-
- VVaalluueess ffoorr _c_m_d AArrgguummeenntt
- The following values can be used for the _c_m_d argument introduced
- above.
-
- FFPP__BBSSEEEEKK
- Sets the current file position as specified by **_a_r_g and **((_a_r_g++11)).
- Not supported on IRIX systems. **_a_r_g contains the bit position
- requested; this must be a byte boundary. **((_a_r_g++11)) specifies one
- of the following values, defined in header file ssttddiioo..hh:
-
- 00 or SSEEEEKK__SSEETT
- Sets the pointer to the value of **_a_r_g, which must be a
- non-negative integer.
-
- 11 or SSEEEEKK__CCUURR
- Sets the pointer to the current position, plus or minus **_a_r_g.
- This is supported only in the following layers that are not
- record-oriented; these layers are specified to aassssiiggnn --FF as
- follows: ssyyssccaallll, ssddss, mmrr (memory resident), ccaacchhee, ccaacchheeaa,
- bbuuffaa, eerr9900.
-
- 22 or SSEEEEKK__EENNDD
- Sets the pointer to the end of the file, minus **_a_r_g. **_a_r_g
- must be a non-negative integer. Not all layers support this
- option.
-
- FFPP__GGAABBSS
- Returns information about the current position in arg, which can
- later be used by a call to ffffppooss with _c_m_d == FFPP__SSAABBSS. _a_r_g is a
- pointer to structure ffpp__aabbss (defined in header file ffffiioo..hh).
-
- This call is useful only for online tape and ER90 files. It may
- be used with the ttaappee, eerr9900, or bbuuffaa layers on UNICOS systems. It
- may be used with the ttaappee layer on CRAY T3E systems. ER90 files
- are not supported on CRAY T3E systems. For some devices, some of
- the fields in ffpp__aabbss may be unused. When this request is made
- after a write function, the library and tape driver flush all
- remaining data from the write behind to the tape before attempting
- to get the position. When this request is made after a read
- request, an approximate address is returned, since there may be
- data buffered in the controller, system buffers, or library
- buffers. FFPP__GGAABBSS does not return information about the volume
- serial number (VSN) currently in use.
-
- FFPP__GGEETTPPOOSS
- Returns information about the current position in _a_r_g, which can
- later be used by a call to ffffppooss with _c_m_d _0=FFPP__SSEETTPPOOSS. For online
- tape files, 2 Cray words are returned in _a_r_g. For files assigned
- with aassssiiggnn --FF eerr9900, 4 Cray words are returned in _a_r_g. For files
- assigned with --FF ccooss,,eerr9900, 6 Cray words are returned in _a_r_g. For
- all other file types, 1 Cray word is returned in _a_r_g. For ER90
- files, the information returned does not include the VSN. When
- using the information returned in a call to ffffppooss with
- _c_m_d==FFPP__SSEETTPPOOSS, you must ensure that you are positioned on the
- correct volume. This command is unsupported for ER90 files that
- use the FFIO tape layer. Available on UNICOS and UNICOS/mk
- systems. ER90 files and the eerr9900 layer are not supported on
- CRAY T3E systems.
-
- FFPP__SSAABBSS
- Sets the position as specified in _a_r_g. The information in _a_r_g
- should have been obtained by a previous call to ffffppooss with
- _c_m_d == FFPP__GGAABBSS. _a_r_g is a pointer to structure ffpp__aabbss. This call
- is useful only for online tape and ER90 files. FFPP__SSAABBSS assumes
- that you are currently positioned on the correct VSN. You must
- have permission to set the position to the specified address when
- using absolute track address positioning. Tape manager permission
- is required for IBM-compatible tapes. For ER90 files, tape
- manager permission is required to position outside the current
- partition. Bypass-label permission or tape manager permission is
- required to position outside the current file, or past a user tape
- mark. Available on UNICOS and UNICOS/mk systems. ER90 files and
- the eerr9900 layer are not supported on CRAY T3E systems.
-
- FFPP__SSEETTPPOOSS
- Sets the position as specified by the information in _a_r_g. The
- information in _a_r_g should have been obtained by a previous call to
- ffffppooss with _c_m_d == FFPP__GGEETTPPOOSS.
-
- Not available on IRIX systems.
-
- FFPP__SSKKIIPPFF
- This value is valid only for online tape files on UNICOS systems
- and on CRAY T3E systems and for ER90 files on UNICOS systems. It
- directs the system to skip a specified number of files from the
- current position. The file will not be positioned beyond BOD or
- EOD. This is used for positioning by user tapemark (see the --TT
- option on the ttppmmnntt(1) command). It may not be used to position
- to different files within a multifile volume (see the --qq option of
- the ttppmmnntt(1) command. _a_r_g is a pointer to structure ffffpp__sskkiippff__ss
- (also defined in header file ffffiioo..hh). This _c_m_d is valid with the
- following FFIO layers: tape. The fields of this structure have
- the following meaning:
-
- ffffpp__nnffiill On input, specifies the number of files to skip. If
- the value is negative, the file is positioned
- backward. On output, contains the number of files
- skipped.
-
- ffffpp__nnrreecc Currently unused.
-
- FFPP__SSKKIIPPTTPPMMKK
- This value is valid only for online tape files on UNICOS systems
- and on CRAY T3E systems. It directs the system to skip a
- specified number of tape marks from the current position. The file
- will not be positioned beyond BOD or EOD. This is used for
- positioning by user tapemark (see the --TT option on the ttppmmnntt(1)
- command). arg is a pointer to structure ffffpp__sskkiippttppmmkk__ss (defined
- in <<ffffiioo..hh>>). The fields in this structure have the following
- meaning:
-
- ffffpp__nnttppmmkk On input, specifies the number of tape marks to skip.
- If the value is negative, the file is positioned
- backwards. On output, this field contains the number
- of tape marks left to position.
-
- uunnuusseedd11 This field is reserved.
-
- The FFPP__SSKKIIPPTTPPMMKK _c_m_d functions differently from FFPP__SSKKIIPPFF. Except
- in the case where you request positioning past EOD, FFPP__SSKKIIPPFF will
- position you at the beginning of a file; that is, FFPP__SSKKIIPPFF will
- position you either at BOD, immediately after a user tape mark, or
- at EOD. FFPP__SSKKIIPPTTPPMMKK functions like the ioctl TTRR__PPTTMMSS described in
- the _T_a_p_e _S_u_b_s_y_s_t_e_m _U_s_e_r'_s _G_u_i_d_e, publication SG-2051. It skips
- the specified number of tape marks. If skipping forward, it will
- position you directly after a user tape mark or at EOD. If
- skipping backwards, it will position you directly before a user
- tape mark or at BOD. This _c_m_d is valid with the following FFIO
- layers: ttaappee.
-
- FFPP__SSEETTTTPP
- _a_r_g is a pointer to structure ffffpp__sseettttpp__ss (also defined in header
- file ffffiioo..hh). This _c_m_d is valid with the following FFIO layers:
- ttaappee.
-
- The eerr9900 layer is not supported on CRAY T3E systems.
-
- On input, the fields of ffffpp__sseettttpp__ss have the following meaning:
-
- ffffpp__nnbb
- Number of blocks to position; should always be a positive
- number.
-
- ffffpp__nnbbss__pp
- Indicates the direction of block positioning. The following
- values are defined in header <ffffiioo..hh>:
-
- FFPP__TTPPOOSS__BBAACCKK
- Indicates that the ffffpp__nnbb field is the number of blocks to
- skip backward, relative to the current position.
-
- FFPP__TTPPOOSS__FFOORRWW
- Indicates that the ffffpp__nnbb field is the number of blocks to
- skip forward, relative to the current position.
-
- FFPP__TTPPOOSS__AABBSS
- Indicates that the ffffpp__nnbb field is an absolute block
- number, relative to the last tape mark number or beginning
- of the volume. If a nonzero value is specified for the
- ffffpp__nnvv field, positioning is absolute with respect to that
- tape volume. If ffffpp__nnvv is 0, and the --TT option was not
- present on the ttppmmnntt(1) command, the position is absolute
- with respect to the current tape volume. If ffffpp__nnvv is 0,
- and the --TT option was present on the ttppmmnntt command, then
- positioning is absolute with respect to the last tape mark
- read or written.
-
- ffffpp__nnvv
- Number of volumes to position; should always be a positive
- number. A volume number of 0 indicates no volume positioning
- is to be performed.
-
- ffffpp__nnvvss__pp
- Indicates the direction of volume positioning. The following
- values are defined in header file ffffiioo..hh:
-
- FFPP__TTPPOOSS__FFOORRWW The number of volumes to skip forward, relative
- to the current position.
-
- FFPP__TTPPOOSS__BBAACCKK The number of volumes to skip backward,
- relative to the current position.
-
- FFPP__TTPPOOSS__AABBSS Specifies an absolute volume number, relative
- to the beginning of the volume identifier list
- (specified on the ttppmmnntt(1) command.)
-
- ffffpp__vvii
- Name of volume identifier to be mounted. A nonzero ffffpp__vvii
- field is invalid if ffffpp__nnbbss__pp is FFPP__TTPPOOSS__FFOORRWW or FFPP__TTPPOOSS__BBAACCKK
- or if ffffpp__nnvvss is FFPP__TTPPOOSS__FFOORRWW or FFPP__TTPPOOSS__BBAACCKK and ffffpp__nnvv is
- nonzero.
-
- RREETTUURRNN VVAALLUUEESS
- If _c_m_d is FFPP__BBSSEEEEKK, ffffppooss returns the new bit position of the file on
- success. For other values of _c_m_d, the ffffppooss function returns 0 on
- success. On failure, it returns -1 and the ssww__eerrrroorr field of the ssttaatt
- structure contains the error number.
-
- SSEEEE AALLSSOO
- ffffooppeenn(3C)
-
- ttppmmnntt(1) in the _U_N_I_C_O_S _U_s_e_r _C_o_m_m_a_n_d_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication
- SR-2011
-
- _T_a_p_e _S_u_b_s_y_s_t_e_m _U_s_e_r'_s _G_u_i_d_e, publication SG-2051
-
- _A_p_p_l_i_c_a_t_i_o_n _P_r_o_g_r_a_m_m_e_r'_s _L_i_b_r_a_r_y _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication
- SR-2165, for the printed version of this man page.
-